// import com.alibaba.druid.sql.ast.SQLExpr;
// import com.alibaba.druid.sql.ast.statement.SQLSelect_ptr;
// import com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlStatementImpl;
// import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlASTVisitor;

// import java.util.ArrayList;
// import java.util.List;

#include "MySqlSelectIntoStatement.h"
#include "../../../../ast/SQLExpr.h"
#include "../../../../ast/statement/SQLSelect.h"
#include "../../visitor/MySqlASTVisitor.h"
#include "../../../../../utils/listTran.h"

MySqlSelectIntoStatement::MySqlSelectIntoStatement()
{
  varList = std::make_shared<std::list<SQLExpr_ptr>>();
}
SQLSelect_ptr MySqlSelectIntoStatement::getSelect()
{
  return select;
}

void MySqlSelectIntoStatement::setSelect(SQLSelect_ptr select)
{
  this->select = select;
}

SQLExpr_list_ptr MySqlSelectIntoStatement::getVarList()
{
  return varList;
}

void MySqlSelectIntoStatement::setVarList(SQLExpr_list_ptr varList)
{
  this->varList = varList;
}

// @Override
void MySqlSelectIntoStatement::accept0(MySqlASTVisitor_ptr visitor)
{
  if (visitor->visit(SharedObject(MySqlSelectIntoStatement)))
  {
    acceptChild(visitor, select);
    SQLObject_list_ptr tmp1 = ListTran::tran_class<SQLExpr, SQLObject>(varList);
    acceptChild(visitor, tmp1);
  }
  visitor->endVisit(SharedObject(MySqlSelectIntoStatement));
}
